import { get, post } from './http'

// =========菜单接口==========
// 菜单添加
export const reqmenuadd = (params)=>post("/api/menuadd",params)

//菜单列表
export const reqmenulist = (params)=>get("/api/menulist",params)

//菜单获取(一条)
export const reqmenuone = (params)=>get("/api/menuinfo",params)

//菜单修改
export const reqmenuedit = (params)=>post("/api/menuedit",params)

//菜单删除
export const reqmenudel = (params)=>post("/api/menudelete",params)


// =========角色管理接口==========
// 角色添加
export const reqroleadd = (params)=>post('/api/roleadd',params)

// 角色列表
export const reqrolelist = ()=>get('/api/rolelist')

// 角色获取(一条)
export const reqroleone = (params)=>get('/api/roleinfo',params)

// 角色修改
export const reqroleedit = (params)=>post('/api/roleedit',params)

// 角色删除
export const reqroledelete = (params)=>post('/api/roledelete',params)


// =========管理员管理接口==========
// 管理员添加
export const requseradd = (params)=>post('/api/useradd',params)

//.管理员总数（用于计算分页）
export const requserall = ()=>get('/api/usercount')

//管理员列表（分页）** 
export const requserlist = (params)=>get('/api/userlist',params)

//管理员获取（一条）
export const requserone = (params)=>get('/api/userinfo',params)

//管理员修改
export const requseredit = (params)=>post('/api/useredit',params)

//管理员删除
export const requserdelete = (params)=>post('/api/userdelete',params)

//管理员登录
export const requserlogin = (params)=>post('/api/userlogin',params)


//会员获取** 
export const reqmemberlist = ()=>get('/api/memberlist')


// =========商品分类管理接口==========
// 商品分类添加
export const reqcateadd = (params)=>post('/api/cateadd',params,true)

//商品分类列表** 
export const reqcatelist = (params)=>get('/api/catelist',params)

//商品分类获取（一条）
export const reqcateone = (params)=>get('/api/cateinfo',params)

//商品分类修改
export const reqcateedit = (params)=>post('/api/cateedit',params,true)

//商品分类删除
export const reqcatedelete = (params)=>post('/api/catedelete',params)


// =========商品规格管理接口==========
// 商品规格添加
export const reqspecsadd = (params)=>post('/api/specsadd',params)

//商品规格总数
export const reqspecsall = ()=>get('/api/specslist')

//商品规格列表** （分页）
export const reqspecslist = (params)=>get('/api/specslist',params)

//商品规格获取（一条）
export const reqspecsone = (params)=>get('/api/specsinfo',params)

//商品规格修改
export const reqspecsedit = (params)=>post('/api/specsedit',params)

//商品规格删除
export const reqspecsdelete = (params)=>post('/api/specsdelete',params)



// =========商品管理接口==========
//商品添加
export const reqgoodsadd = (params)=>post('/api/goodsadd',params,true)

//商品总数(用于计算分页)
export const reqgoodscount = ()=>get('/api/goodscount')

//商品列表(分页)
export const reqgoodslist =(params)=>get('/api/goodslist',params)

//商品获取一条
export const reqgoodsone = (params)=>get('/api/goodsinfo',params)

//商品修改
export const reqgoodsedit = (params)=>post('/api/goodsedit',params,true)

//商品删除
export const reqgoodsdelete = (params)=>post('',params)


// =========会员接口==========
//会员列表
export const reqmenberlist = (params)=>get('/api/memberlist',params)

//会员获取(一条)
export const reqmenberone = (params)=>get('/api/memberinfo',params)

//会员修改
export const reqmemberedit = (params)=>post('/api/memberedit',params)


// =========轮播图管理接口==========
// 轮播图添加
export const reqbanneradd = (params)=>post('/api/banneradd',params,true)


//轮播图列表** 
export const reqbannerlist = ()=>get('/api/bannerlist')

//轮播图获取（一条）
export const reqbannerone = (params)=>get('/api/bannerinfo',params)

//轮播图修改
export const reqbanneredit = (params)=>post('/api/banneredit',params,true)

//轮播图删除
export const reqbannerdelete = (params)=>post('/api/bannerdelete',params)
